package chances.epg.entity.content;

import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;

public class Media implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -5578766227011168272L;
	private Long id;
	private Long contentId;
	private String contentCode;
	private String type;
	private String assetId;
	private String assetCode;
	private String audioType;
	private long fileSize;
	private String checkSum;
	private String filePath;
	private String format;
	private String birate;
	private boolean hd;
	private String reserve1;
	private String reserve2;
	private String reserve3;
	private String reserve4;
	private String reserve5;
	private String externalCode;
	private String bizDomain;

	private String envelope;// 封装格式
	private String bitrateType;// 码率类型，VBR/CBR
	private String videoCodec;// 编码格式
	private String videoBitrate;// 码率
	private String resolution;// 分辨率
	private String frameRate;// 帧率
	private String audioCodec;// 音频编码格式
	private String audioBitrate;// 音频码率

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAssetId() {
		return assetId;
	}

	public void setAssetId(String assetId) {
		this.assetId = assetId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getAudioType() {
		return audioType;
	}

	public void setAudioType(String audioType) {
		this.audioType = audioType;
	}

	public long getFileSize() {
		return fileSize;
	}

	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}

	public String getCheckSum() {
		return checkSum;
	}

	public void setCheckSum(String checkSum) {
		this.checkSum = checkSum;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}
	
	public String getFileName() {
		if(StringUtils.isBlank(this.filePath)){
			return "";
		}else{
			return FilenameUtils.getName(this.filePath);
		}
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getBirate() {
		return birate;
	}

	public void setBirate(String birate) {
		this.birate = birate;
	}

	public boolean isHd() {
		return hd;
	}

	public void setHd(boolean hd) {
		this.hd = hd;
	}

	public String getReserve1() {
		return reserve1;
	}

	public void setReserve1(String reserve1) {
		this.reserve1 = reserve1;
	}

	public String getReserve2() {
		return reserve2;
	}

	public void setReserve2(String reserve2) {
		this.reserve2 = reserve2;
	}

	public String getReserve3() {
		return reserve3;
	}

	public void setReserve3(String reserve3) {
		this.reserve3 = reserve3;
	}

	public String getReserve4() {
		return reserve4;
	}

	public void setReserve4(String reserve4) {
		this.reserve4 = reserve4;
	}

	public String getReserve5() {
		return reserve5;
	}

	public void setReserve5(String reserve5) {
		this.reserve5 = reserve5;
	}

	public String getAssetCode() {
		return assetCode;
	}

	public void setAssetCode(String assetCode) {
		this.assetCode = assetCode;
	}

	/**
	 * @return the contentCode
	 */
	public String getContentCode() {
		return contentCode;
	}

	/**
	 * @param contentCode
	 *            the contentCode to set
	 */
	public void setContentCode(String contentCode) {
		this.contentCode = contentCode;
	}

	/**
	 * @return the contentId
	 */
	public Long getContentId() {
		return contentId;
	}

	/**
	 * @param contentId
	 *            the contentId to set
	 */
	public void setContentId(Long contentId) {
		this.contentId = contentId;
	}

	public String getExternalCode() {
		return externalCode;
	}

	public void setExternalCode(String externalCode) {
		this.externalCode = externalCode;
	}

	public String getBizDomain() {
		return bizDomain;
	}

	public void setBizDomain(String bizDomain) {
		this.bizDomain = bizDomain;
	}

	public String getEnvelope() {
		return envelope;
	}

	public void setEnvelope(String envelope) {
		this.envelope = envelope;
	}

	public String getBitrateType() {
		return bitrateType;
	}

	public void setBitrateType(String bitrateType) {
		this.bitrateType = bitrateType;
	}

	public String getVideoCodec() {
		return videoCodec;
	}

	public void setVideoCodec(String videoCodec) {
		this.videoCodec = videoCodec;
	}

	public String getVideoBitrate() {
		return videoBitrate;
	}

	public void setVideoBitrate(String videoBitrate) {
		this.videoBitrate = videoBitrate;
	}

	public String getResolution() {
		return resolution;
	}

	public void setResolution(String resolution) {
		this.resolution = resolution;
	}

	public String getFrameRate() {
		return frameRate;
	}

	public void setFrameRate(String frameRate) {
		this.frameRate = frameRate;
	}

	public String getAudioCodec() {
		return audioCodec;
	}

	public void setAudioCodec(String audioCodec) {
		this.audioCodec = audioCodec;
	}

	public String getAudioBitrate() {
		return audioBitrate;
	}

	public void setAudioBitrate(String audioBitrate) {
		this.audioBitrate = audioBitrate;
	}
}
